package com.aspose.cells;

class zbue {
   static String a(String var0) {
      StringBuilder var1 = new StringBuilder(var0.length());
      char[] var2 = var0.toCharArray();

      for(int var3 = 0; var3 < var2.length; ++var3) {
         switch(var2[var3]) {
         case ' ':
         case '"':
         case '[':
         case ']':
            var1.append('%');
            var1.append(com.aspose.cells.a.c.zp.c(var2[var3]));
            break;
         default:
            var1.append(var2[var3]);
         }
      }

      return com.aspose.cells.b.a.zr.a(var1);
   }

   static String b(String var0) {
      if (var0 == null) {
         return null;
      } else {
         StringBuilder var1 = new StringBuilder(var0.length());
         char[] var2 = var0.toCharArray();

         for(int var3 = 0; var3 < var2.length; ++var3) {
            if (var2[var3] == '%' && var3 + 2 < var2.length) {
               int var4 = (zapb.a(var2[var3 + 1]) << 4) + zapb.a(var2[var3 + 2]);
               var1.append((char)var4);
               var3 += 2;
            } else {
               var1.append(var2[var3]);
            }
         }

         return com.aspose.cells.b.a.zr.a(var1);
      }
   }
}
